package com
{
	import com.micmac.main.controller.LoadResourceCommand;
	import com.micmac.main.controller.MainCommand;
	import com.micmac.main.view.compenents.MainMediator;
	import com.micmac.customer.interfaces.ICustomerModule;
	import com.micmac.customer.view.CorporationView;
	
	import flash.events.Event;
	import flash.net.registerClassAlias;
	
	import org.robotlegs.base.ContextEvent;
	import org.robotlegs.mvcs.Context;
	import org.robotlegs.utilities.modular.mvcs.ModuleContext;
	
	/*
	
	Author : Roy Raul.
	
	Component : AppContext             
	
	Version History         : 0.1 Date Jul-20-2011
	
	Current Version         : 0.1 Date Jul-20-2011
	
	Build Date              : Apr-14-2010
	
	*/
	
	public class AppContext extends ModuleContext
	{
		override public function startup():void{
			mapView();
			controller();
			super.startup();
		}
		
		private function mapView():void
		{
			mediatorMap.mapView(Visi, MainMediator,Visi);
		}
		
		private function controller():void
		{
		    commandMap.mapEvent(ContextEvent.STARTUP_COMPLETE, MainCommand, Event);
			commandMap.mapEvent(AppConst.LOAD_RESOURCE,LoadResourceCommand,Event);
			
			/*module command map*/
			viewMap.mapType(ICustomerModule);
			
		}
		
	}
}